@include('admin.common.header')

<!--tab nav start-->
<section class="panel">
    <header class="panel-heading tab-bg-dark-navy-blue ">
        <ul class="nav nav-tabs">
            <li @if ($_active['_action'] == 'list')  class="active" @endif>
                <a href="/admin/banner">广告图列表</a>
            </li>
            <li @if ($_active['_action'] == 'add')  class="active" @endif>
                <a href="/admin/banner/add">添加广告图</a>
            </li>
        </ul>
    </header>
    <div class="panel-body">
        <div class="tab-content">
            <div class="row cmxform form-horizontal tasi-form">
                <div class="col-lg-6">
                    <section class="panel">
                        <div class="panel-body">
                            <div class="form-group ">
                                <label for="name" class="control-label col-lg-2">标题</label>
                                <div class="col-lg-10">
                                    <input class="form-control form-item" name="title" placeholder="" type="text" />
                                </div>
                            </div>
                        </div>
                        <div class="panel-body">
                            <div class="form-group ">
                                <label for="name" class="control-label col-lg-2">跳转链接</label>
                                <div class="col-lg-10">
                                    <input class="form-control form-item" name="redirect_url" placeholder="" type="text" />
                                </div>
                            </div>
                        </div>
                        <div class="panel-body">
                            <div class="form-group ">
                                <label for="name" class="control-label col-lg-2">上线时间</label>
                                <div class="col-lg-10">
                                    <input class="form-control form-item" id="on_line_time" name="on_line_time" placeholder="" type="text" />
                                </div>
                            </div>
                        </div>
                        <div class="panel-body">
                            <div class="form-group ">
                                <label for="name" class="control-label col-lg-2">下线时间</label>
                                <div class="col-lg-10">
                                    <input class="form-control form-item" id="off_line_time" name="off_line_time" placeholder="" type="text" />
                                </div>
                            </div>
                        </div>
                        <div class="panel-body">
                            <div class="form-group ">
                                <label for="name" class="control-label col-lg-2">排序</label>
                                <div class="col-lg-10">
                                    <input class="form-control form-item" name="sort" placeholder="" type="text" value="0" />
                                </div>
                            </div>
                        </div>
                    </section>
                </div>
                <div class="col-lg-6">
                    <section class="panel">
                        <div class="panel-body">
                            <div class="form">
                                <div class="form-group ">
                                    <div class="col-lg-12">
                                        <!-- D&D Zone-->
                                        <div id="drag-and-drop-zone" class="uploader">
                                            <div>上传商品图片</div>
                                            <div>将图片拖拽到此处</div>
                                            <div class="or">-或者-</div>
                                            <div class="browser">
                                                <label>
                                                    <span>点击上传图片</span>
                                                    <input type="file" name="backgroundImage[]" multiple="multiple" title='Click to add Files'>
                                                </label>
                                            </div>
                                        </div>
                                        <div class="panel panel-default">
                                            <div class="panel-heading">
                                                <h3 class="panel-title">Uploads</h3>
                                            </div>
                                            <div class="panel-body demo-panel-files" id='demo-files'>
                                                <span class="demo-note">No Files have been selected/droped yet...</span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </section>
                </div>
            </div>
            <div class="col-lg-12 text-center">
                <button class="btn btn-danger form-submit" type="button">添加</button>
            </div>
        </div>
    </div>
</section>
<!--tab nav start-->

<script>
    require(['app/banner', 'common/uploadImg', 'libs/layDate-v5.0.9/laydate/laydate'] , function (banner, uploadImg, layerDate) {
        banner.ajaxAddBanner();
        uploadImg.upImg(1);
        layerDate.render({
            elem: '#on_line_time'
            ,type: 'datetime'
        });

        layerDate.render({
            elem: '#off_line_time'
            ,type: 'datetime'
        });
    });
</script>

@include('admin.common.footer')